Critical section
PROTECTED SECTION OF CODE THAT CANNOT BE EXECUTED BY MORE THAN ONE PROCESS AT A TIME
Critical sections; Details about critical section
In concurrent programming, concurrent accesses to shared resources can lead to unexpected or erroneous behavior, so parts of the program where the shared resource is accessed need to be protected in ways that avoid the concurrent access. One way to do so is known as a critical section or critical region.